//
//  YYSpellGroupVC.m
//  drivingSchool
//
//  Created by 子yu 刘 on 2018/8/19.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "YYSpellGroupVC.h"

@interface YYSpellGroupVC ()

@end

@implementation YYSpellGroupVC

- (void)viewDidLoad {
    [super viewDidLoad];
}



- (IBAction)spell:(id)sender {
    if (self.tfName.text.length == 0) {
        [AlertUtil alertMessage:@"请输入您的姓名"];
        return;
    }
    if (self.tfPhone.text.length != 11) {
        [AlertUtil alertMessage:@"请输入正确的手机号码"];
        return;
    }
    [RequestOperationManager groupBuy_name:self.tfName.text is_purchase:self.sid iphone:self.tfPhone.text success:^(id result) {
        if (DEF_REQ_SUCCESS) {
            [AlertUtil alertMessage:@"团购成功"];
            [self.navigationController popViewControllerAnimated:YES];
        }
        
    } failture:^(NSError *error) {
        
    }];
}


@end
